home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c / 641 < prev    next >
Encoding:
Text File  |  1996-08-06  |  1.8 KB  |  48 lines

  1. Newsgroups: comp.std.c
  2. Path: howland.reston.ans.net!torn!sq!msb
  3. From: msb@sq.com (Mark Brader)
  4. Subject: Re: externsions and Standard C
  5. Message-ID: <1996Mar23.202452.14793@sq.com>
  6. Organization: SoftQuad Inc., Toronto, Canada
  7. References: <4gum82$14v4@info4.rus.uni-stuttgart.de> <MPLANET.31530e9djcoffin98993e@news.rmii.com> <31536199.219868914@nntp.ix.netcom.com> <315418FA.1508@iadfw.net>
  8. Date: Sat, 23 Mar 1996 20:24:52 GMT
  9.  
  10. lfw@iadfw.net writes:
  11. > Mike Rubenstein wrote:
  12. >  > You've missed a rather subtle point.  Such extensions are legal but
  13. >  > they do not introduce integer types.  The standard defines the signed
  14. >  > integer types as being signed char, short int, int, and long int (and
  15. >  > similarly for unsigned integer types).
  16.  
  17. > It must be pretty subtle!
  18.  
  19. Not at all.
  20.  
  21. > Can you cite specific Clause references ...
  22.  
  23. It's in 6.1.2.5/3.1.2.5:
  24.  
  25. # There are four "signed integer types", designated as signed char,
  26. # short int, int, and long int ...
  27.  
  28. It says four, not four or more.
  29.  
  30. # For each of the signed integer types, there is a corresponding
  31. # (but different) "unsigned integer type".
  32.  
  33. It is true that size_t is specified by 6.3.3.4/3.3.3.4 as having an
  34. "unsigned integral type" rather than "unsigned integer type", but the
  35. draft Record of Reponse 2 confirms that these terms were not intended
  36. to be distinguished.
  37.  
  38. Thus if x is of type size_t, printf ("%ul\n", (unsigned long) x); is
  39. safe under the present standard.
  40. -- 
  41. Mark Brader                     And as in nerdish thought he stood,
  42. msb@sq.com                      the Jargontalk, with awk and grep,
  43. SoftQuad Inc.                   Came geeking through the Cobol wood,
  44. Toronto                         and edlin as it schlepped.
  45.                                    --Larry Colen (after Lewis Carroll)
  46.  
  47. My text in this article is in the public domain.
  48.